package com.ruoyi.cat.service.impl;

import java.util.Collections;
import java.util.List;

import com.ruoyi.cat.domain.AdGift;
import com.ruoyi.cat.domain.AdGiftLike;
import com.ruoyi.cat.mapper.AdGiftLikeMapper;
import com.ruoyi.cat.service.IAdGiftLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 喜欢Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-05
 */
@Service
public class AdGiftLikeServiceImpl implements IAdGiftLikeService
{
    @Autowired
    private AdGiftLikeMapper adGiftLikeMapper;

    /**
     * 查询喜欢
     * 
     * @param id 喜欢主键
     * @return 喜欢
     */
    @Override
    public AdGiftLike selectAdGiftLikeById(Long id)
    {
        return adGiftLikeMapper.selectAdGiftLikeById(id);
    }

    /**
     * 查询喜欢列表
     * 
     * @param adGiftLike 喜欢
     * @return 喜欢
     */
    @Override
    public List<AdGiftLike> selectAdGiftLikeList(AdGiftLike adGiftLike)
    {
        return adGiftLikeMapper.selectAdGiftLikeList(adGiftLike);
    }

    /**
     * 新增喜欢
     * 
     * @param adGiftLike 喜欢
     * @return 结果
     */
    @Override
    public int insertAdGiftLike(AdGiftLike adGiftLike)
    {
        return adGiftLikeMapper.insertAdGiftLike(adGiftLike);
    }

    /**
     * 修改喜欢
     * 
     * @param adGiftLike 喜欢
     * @return 结果
     */
    @Override
    public int updateAdGiftLike(AdGiftLike adGiftLike)
    {
        return adGiftLikeMapper.updateAdGiftLike(adGiftLike);
    }

    /**
     * 批量删除喜欢
     * 
     * @param ids 需要删除的喜欢主键
     * @return 结果
     */
    @Override
    public int deleteAdGiftLikeByIds(Long[] ids)
    {
        return adGiftLikeMapper.deleteAdGiftLikeByIds(ids);
    }

    /**
     * 删除喜欢信息
     * 
     * @param id 喜欢主键
     * @return 结果
     */
    @Override
    public int deleteAdGiftLikeById(Long id)
    {
        return adGiftLikeMapper.deleteAdGiftLikeById(id);
    }

    @Override
    public List<AdGift> getGiftLike(Long userId) {
        return adGiftLikeMapper.getGiftLike(userId);
    }
}
